package com.txby.wxyyApi.component.web;

import java.util.Arrays;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class TemplateController {
   
	/**
	 * @return
	 */
	@RequestMapping("/hello")
	public String hello(Map<String,Object> map,Model model){
		//返回的是ModelAndView对象;
//		ModelAndView mv = new ModelAndView("hello");
//		return mv;
		map.put("name","jiaojing");
		model.addAttribute("message","message2222");
		map.put("list",Arrays.asList("s1","s2"));
		return "hello";
	}
	
	@RequestMapping("/helloFtl")
	public String helloFtl(Map<String,Object> map,Model model){
		map.put("name","jiaojing");
		model.addAttribute("message","message");
		map.put("list",Arrays.asList("s1","s2"));
		return "helloFtl";
	}
   
}